package com.ray.provider;

import com.alibaba.dubbo.config.annotation.Service;
import com.ray.entity.User;
import com.ray.service.UserService;
import org.springframework.stereotype.Component;

//实现api中的接口
@Service(interfaceClass = UserService.class)
@Component
public class UserServiceImpl implements UserService {

    @Override
    public User selectUserById(Integer userId) {
        User user = new User();
        user.setId(userId);
        user.setUsername("张三");
        System.out.println("提供服务，用户id为："+userId);
        return user;
    }

}
